package com.wtwd.device.model.dto;


import com.wtwd.device.constant.AppMsgEnum;

/**
 * @author zdl
 * @date 2021/11/23 10:22
 */
public class PushMsgDTO {
    private String toUser;
    private String msgTitle;
    private String msgContent;
    private String clientType;
    private String extraParams;

    private static final String appUserInfoServiceName = "appUserInfoServiceImpl";
    private static final String pushLocaleSourceServiceName = "pushLocaleSourceServiceImpl";

    public PushMsgDTO(String toUser, String clientType, AppMsgEnum appMsgEnum, String... extraParams) {
        this.toUser = toUser;
        this.clientType = clientType;
        this.msgTitle = appMsgEnum.getTitle();
        this.msgContent = appMsgEnum.getContents();
        String extra = appMsgEnum.getExtraParams();
        this.extraParams = extraParams.length == 0 ? extra : String.format(extra, extraParams);
    }

    public PushMsgDTO(String toUser, String msgTitle, String msgContent, String clientType, String extraParams) {
        this.toUser = toUser;
        this.msgTitle = msgTitle;
        this.msgContent = msgContent;
        this.clientType = clientType;
        this.extraParams = extraParams;
    }

    public PushMsgDTO() {
    }

    public String getExtraParams() {
        return extraParams;
    }

    public void setExtraParams(String extraParams) {
        this.extraParams = extraParams;
    }

    public String getToUser() {
        return toUser;
    }

    public void setToUser(String toUser) {
        this.toUser = toUser;
    }

    public String getMsgContent() {
        return msgContent;
    }

    public void setMsgContent(String msgContent) {
        this.msgContent = msgContent;
    }

    public String getMsgTitle() {
        return msgTitle;
    }

    public void setMsgTitle(String msgTitle) {
        this.msgTitle = msgTitle;
    }

    public String getClientType() {
        return clientType;
    }

    public void setClientType(String clientType) {
        this.clientType = clientType;
    }
}
